NotificationCompatSideChannelService

Abstract service to receive side channel notifications sent from androidx.core.app.NotificationManagerCompat.

To receive side channel notifications, extend this service and register it in your android manifest with an intent filter for the BIND_NOTIFICATION_SIDE_CHANNEL action. Note: you must also have an enabled android.service.notification.NotificationListenerService within your package.

Example AndroidManifest.xml addition:

<service android:name="com.example.NotificationSideChannelService">
    <intent-filter>
        <action android:name="android.support.BIND_NOTIFICATION_SIDE_CHANNEL" />
    </intent-filter>
</service>

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
abstract fun cancel(packageName: String, id: Int, tag: String)
Handle a side-channelled notification being cancelled.
Link copied to clipboard
abstract fun cancelAll(packageName: String)
Handle the side-channelled cancelling of all notifications for a package.
Link copied to clipboard
abstract fun notify(packageName: String, id: Int, tag: String, notification: Notification)
Handle a side-channeled notification being posted.
Link copied to clipboard
@DeprecatedSinceApi(api = 19, message = "SDKs past 19 have no need for side channeling.")
open fun onBind(intent: Intent): IBinder